home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail-5.65c+IDA-1.4.4.1 / src / def.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-20  |  11.1 KB  |  501 lines

  1. /*
  2.  * Copyright (c) 1991 Regents of the University of California and
  3.  * the University of Illinois Board of Trustees.
  4.  * All rights reserved.
  5.  *
  6.  * Redistribution and use in source and binary forms are permitted provided
  7.  * that: (1) source distributions retain this entire copyright notice and
  8.  * comment, and (2) distributions including binaries display the following
  9.  * acknowledgement:  ``This product includes software developed by the
  10.  * University of California, Berkeley and its contributors'' in the
  11.  * documentation or other materials provided with the distribution and in
  12.  * all advertising materials mentioning features or use of this software.
  13.  * Neither the name of the University nor the names of its contributors may
  14.  * be used to endorse or promote products derived from this software without
  15.  * specific prior written permission.
  16.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  17.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  18.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19.  *
  20.  * Contributed by Paul Pomes, University of Illinois Computing Services Office.
  21.  *
  22.  *    @(#)def.h    1.1    2/17/91
  23.  */
  24.  
  25. /*
  26.  * ANSI C function declarators
  27.  */
  28.  
  29. #ifndef lint
  30. # ifdef _DEFINE
  31. static char def_h_sccsid[] = "@(#)def.h    1.1 (Berkeley) 2/17/91";
  32. static char  def_h_rcsid[] = "@(#)$Id: def.h,v 1.11 1991/06/21 12:44:33 paul Exp $";
  33. # endif /* _DEFINE */
  34. #endif /* !lint */
  35.  
  36. #ifdef __STDC__
  37.  
  38. /* List of machine types that don't do type promotion in prototypes */
  39. # if defined(apollo)
  40. #  define    CC_WONT_PROMOTE
  41. # endif /* apollo */
  42.  
  43. /* alias.c */
  44. void alias(ADDRESS *, ADDRESS **);
  45. char * aliaslookup(char *);
  46. void initaliases(bool);
  47. void forward(ADDRESS *, ADDRESS **);
  48.  
  49. /* arpadate.c */
  50. char * arpadate(char *);
  51. char * arpatounix(char *, ENVELOPE *);
  52.  
  53. /* clock.c */
  54. EVENT * setevent(TIME_TYPE, void (*f)(), int);
  55. void clrevent(EVENT *);
  56. void Xsleep(unsigned int);
  57.  
  58. /* collect.c */
  59. void collect(bool);
  60.  
  61. /* conf.c */
  62. void setdefaults();
  63. void setdefuser();
  64. int getruid();
  65. int getrgid();
  66. char * username();
  67. char * ttypath();
  68. bool checkcompat(ADDRESS *);
  69. void holdsigs();
  70. void rlsesigs();
  71. int getla();
  72. bool shouldqueue(long);
  73. void setproctitle(const char *, ...);
  74. SIG_TYPE reapchild();
  75.  
  76. /* convtime.c */
  77. TIME_TYPE convtime(const char *);
  78. char * pintvl(TIME_TYPE, bool);
  79.  
  80. /* daemon.c */
  81. void getrequests();
  82. void clrdaemon();
  83. # ifdef CC_WONT_PROMOTE
  84. int makeconnection(const char *, u_short, FILE **, FILE **);
  85. # else /* !CC_WONT_PROMOTE */
  86. int makeconnection(const char *, int, FILE **, FILE **); /* u_short -> int */
  87. # endif /* CC_WONT_PROMOTE */
  88. char ** myhostname(char [], int);
  89. bool maphostname(char *, bool);
  90. # ifdef CC_WONT_PROMOTE
  91. bool mapinit(char);
  92. char * mapkey(char, char *, int, const char *);
  93. # else /* !CC_WONT_PROMOTE */
  94. bool mapinit(int);                /* char -> int */
  95. char * mapkey(int, char *, int, const char *);    /* char -> int */
  96. # endif /* CC_WONT_PROMOTE */
  97.  
  98. /* deliver.c */
  99. int deliver(ENVELOPE *, ADDRESS *);
  100. int dofork();
  101. int endmailer(int, const char *);
  102. int openmailer(MAILER *, char **, ADDRESS *, bool, FILE **, FILE **);
  103. void giveresponse(int, MAILER *, ENVELOPE *);
  104. void logdelivery(MAILER *, const char *);
  105. void putfromline(FILE *, MAILER *);
  106. void putbody(FILE *, MAILER *, ENVELOPE *);
  107. # ifdef CC_WONT_PROMOTE
  108. void sendall(ENVELOPE *, char);
  109. # else /* !CC_WONT_PROMOTE */
  110. void sendall(ENVELOPE *, int);            /* char -> int */
  111. # endif /* CC_WONT_PROMOTE */
  112.  
  113. /* domain.c */
  114. int getmxrr(const char *, char **, int *);
  115. bool getcanonname(char *, int);
  116.  
  117. /* envelope.c */
  118. ENVELOPE * newenvelope(ENVELOPE *);
  119. void dropenvelope(ENVELOPE *);
  120. void clearenvelope(ENVELOPE *, bool);
  121. void initsys();
  122. void settime();
  123. void openxscript(ENVELOPE *);
  124. void setsender(char *);
  125.  
  126. /* err.c */
  127. void syserr(const char *, ...);
  128. void usrerr(const char *, ...);
  129. void message(const char *, const char *, ...);
  130. void nmessage(const char *, const char *, ...);
  131. char * errstring(int);
  132.  
  133. /* getloadavg.c */
  134. int getloadavg(caddr_t);
  135.  
  136. /* headers.c */
  137. int chompheader(char *, bool);
  138. void addheader(char *, const char *, ENVELOPE *);
  139. char * hvalue(const char *);
  140. HDR * findheader(const char *, ENVELOPE *);
  141. bool isheader(const char *);
  142. void eatheader(ENVELOPE *, FILE *);
  143. char * crackaddr(char *);
  144. void putheader(FILE *, MAILER *, ENVELOPE *);
  145. void commaize(HDR *, char *, FILE *, bool, MAILER *);
  146.  
  147. /* macro.c */
  148. void expand(const char *, char *, const char *, ENVELOPE *);
  149. # ifdef CC_WONT_PROMOTE
  150. void define(char, char *, ENVELOPE *);
  151. char * macvalue(char, ENVELOPE *);
  152. # else /* !CC_WONT_PROMOTE */
  153. void define(int, char *, ENVELOPE *);        /* char -> int */
  154. char * macvalue(int, ENVELOPE *);        /* char -> int */
  155. # endif /* CC_WONT_PROMOTE */
  156.  
  157. /* main.c */
  158. void finis();
  159. void disconnect(bool);
  160.  
  161. /* parseaddr.c */
  162. # ifdef CC_WONT_PROMOTE
  163. ADDRESS * parseaddr(const char *, ADDRESS *, int, char);
  164. char ** prescan(char *, char, char []);
  165. # else /* !CC_WONT_PROMOTE */
  166. ADDRESS * parseaddr(char *, ADDRESS *, int, int);    /* char -> int */
  167. char ** prescan(char *, int, char []);        /* char -> int */
  168. # endif /* CC_WONT_PROMOTE */
  169. void loweraddr(ADDRESS *);
  170. bool invalidaddr(const char *);
  171. void rewrite(char **, int);
  172. void cataddr(char **, char *, int);
  173. bool sameaddr(ADDRESS *, ADDRESS *);
  174. void printaddr(ADDRESS *, bool);
  175. char * remotename(char *, MAILER *, bool, bool, bool);
  176.  
  177. /* queue.c */
  178. FILE * queueup(ENVELOPE *, bool, bool);
  179. void runqueue(int);
  180. void printqueue();
  181. # ifdef CC_WONT_PROMOTE
  182. char * queuename(ENVELOPE *, char);
  183. # else /* !CC_WONT_PROMOTE */
  184. char * queuename(ENVELOPE *, int);        /* char -> int */
  185. # endif /* CC_WONT_PROMOTE */
  186. void unlockqueue(ENVELOPE *);
  187. void setctladdr(ADDRESS *);
  188.  
  189. /* readcf.c */
  190. void readcf(char *);
  191. void printrules();
  192. # ifdef CC_WONT_PROMOTE
  193. void setoption(char, const char *, bool, bool);
  194. # else /* !CC_WONT_PROMOTE */
  195. void setoption(int, const char *, bool, bool);    /* char -> int */
  196. # endif /* CC_WONT_PROMOTE */
  197. void setclass(int, const char *);
  198.  
  199. /* recipient.c */
  200. void sendtolist(const char *, ADDRESS *, ADDRESS **);
  201. ADDRESS * recipient(ADDRESS *, ADDRESS **);
  202. void include(const char *, const char *, ADDRESS *, ADDRESS **);
  203. void sendtoargv(char **);
  204. ADDRESS * getctladdr(ADDRESS *);
  205.  
  206. /* savemail.c */
  207. void savemail(ENVELOPE *);
  208. int returntosender(const char *, ADDRESS *, bool);
  209.  
  210. /* srvrsmtp.c */
  211. void smtp(bool);
  212.  
  213. /* stab.c */
  214. STAB * stab(const char *, int, int);
  215.  
  216. /* stats.c */
  217. void markstats(ENVELOPE *, ADDRESS *);
  218. void poststats(char *);
  219.  
  220. /* sysexits.c */
  221. char * statstring(int);
  222.  
  223. /* trace.c */
  224. void tTsetup(u_char *, int, const char *);
  225. void tTflag(const char *);
  226.  
  227. /* usersmtp.c */
  228. # ifdef MAIL11V3
  229. int smtpinit(MAILER *, char **, ENVELOPE *);
  230. # else /* ! MAIL11V3 */
  231. int smtpinit(MAILER *, char **);
  232. # endif /* MAIL11V3 */
  233. int smtprcpt(ADDRESS *, MAILER *);
  234. int smtpdata(MAILER *, ENVELOPE *);
  235. void smtpquit(MAILER *);
  236. int smtpstat(MAILER *);
  237.  
  238. /* util.c */
  239. void stripquotes(char *, bool);
  240. int qstrlen(const char *);
  241. char * capitalize(const char *);
  242. void * xalloc(int);
  243. char ** copyplist(char **, bool);
  244. void printav(char **);
  245. # ifdef CC_WONT_PROMOTE
  246. char lower(char);
  247. # else /* !CC_WONT_PROMOTE */
  248. char lower(int);                /* char -> int */
  249. # endif /* CC_WONT_PROMOTE */
  250. void xputs(const char *);
  251. void makelower(char *);
  252. void buildfname(const char *, const char *, char *);
  253. bool safefile(char *, int, int);
  254. void fixcrlf(char *, bool);
  255. FILE * dfopen(const char *, const char *);
  256. void putline(char *, FILE *, MAILER *);
  257. void xunlink(char *);
  258. char * sfgets(char *, int, FILE *);
  259. char * fgetfolded(char *, int, FILE *);
  260. TIME_TYPE curtime();
  261. bool atobool(const char *);
  262. int atooct(const char *);
  263. int waitfor(int);
  264. bool bitintersect(BITMAP, BITMAP);
  265. bool bitzerop(BITMAP);
  266. void printcav(char **);
  267. void WritePid();
  268.  
  269. /* strcnv.c */
  270. # ifdef BIT8
  271. CHAR8U * strcnv(CHARSET *, CHARSET *, CHAR8U *, CHAR8U *);
  272. CHAR8U * strncnv(CHARSET *, CHARSET *, CHAR8U *, CHAR8U *, int);
  273. #  ifdef CC_WONT_PROMOTE
  274. CHARSET * getchset(char *, INT16S);
  275. #  else /* !CC_WONT_PROMOTE */
  276. CHARSET * getchset(char *, int);
  277. #  endif /* CC_WONT_PROMOTE */
  278. # endif /* BIT8 */
  279.  
  280. /* version.c */
  281.  
  282. /* random ones */
  283.  
  284. char * getenv(const char *);
  285. FILE * fdopen(int, const char *);
  286. FILE * popen(const char *, const char *);
  287. TIME_TYPE time(TIME_TYPE *);
  288.  
  289. #else /* !__STDC__ */
  290.  
  291. /* This keeps non-ANSI compilers happy */
  292. # define    const
  293.  
  294. /* alias.c */
  295. void alias();
  296. char * aliaslookup();
  297. void initaliases();
  298. void forward();
  299.  
  300. /* arpadate.c */
  301. char * arpadate();
  302. char * arpatounix();
  303.  
  304. /* clock.c */
  305. EVENT * setevent();
  306. void clrevent();
  307. void Xsleep();
  308.  
  309. /* collect.c */
  310. void collect();
  311.  
  312. /* conf.c */
  313. void setdefaults();
  314. void setdefuser();
  315. int getruid();
  316. int getrgid();
  317. char * username();
  318. char * ttypath();
  319. bool checkcompat();
  320. void holdsigs();
  321. void rlsesigs();
  322. int getla();
  323. bool shouldqueue();
  324. void setproctitle();
  325. SIG_TYPE reapchild();
  326.  
  327. /* convtime.c */
  328. TIME_TYPE convtime();
  329. char * pintvl();
  330.  
  331. /* daemon.c */
  332. void getrequests();
  333. void clrdaemon();
  334. int makeconnection();
  335. char ** myhostname();
  336. bool maphostname();
  337. bool mapinit();
  338. char * mapkey();
  339.  
  340. /* deliver.c */
  341. int deliver();
  342. int dofork();
  343. int endmailer();
  344. int openmailer();
  345. void giveresponse();
  346. void logdelivery();
  347. void putfromline();
  348. void putbody();
  349. void sendall();
  350.  
  351. /* domain.c */
  352. int getmxrr();
  353. bool getcanonname();
  354.  
  355. /* envelope.c */
  356. ENVELOPE * newenvelope();
  357. void dropenvelope();
  358. void clearenvelope();
  359. void initsys();
  360. void settime();
  361. void openxscript();
  362. void setsender();
  363.  
  364. /* err.c */
  365. void syserr();
  366. void usrerr();
  367. void message();
  368. void nmessage();
  369. char * errstring();
  370.  
  371. /* getloadavg.c */
  372. int getloadavg();
  373.  
  374. /* headers.c */
  375. int chompheader();
  376. void addheader();
  377. char * hvalue();
  378. HDR * findheader();
  379. bool isheader();
  380. void eatheader();
  381. char * crackaddr();
  382. void putheader();
  383. void commaize();
  384.  
  385. /* macro.c */
  386. void expand();
  387. void define();
  388. char * macvalue();
  389.  
  390. /* main.c */
  391. void finis();
  392. void disconnect();
  393.  
  394. /* parseaddr.c */
  395. ADDRESS * parseaddr();
  396. void loweraddr();
  397. bool invalidaddr();
  398. char ** prescan();
  399. void rewrite();
  400. void cataddr();
  401. bool sameaddr();
  402. void printaddr();
  403. char * remotename();
  404.  
  405. /* queue.c */
  406. FILE * queueup();
  407. void runqueue();
  408. void printqueue();
  409. char * queuename();
  410. void unlockqueue();
  411. void setctladdr();
  412.  
  413. /* readcf.c */
  414. void readcf();
  415. void printrules();
  416. void setoption();
  417. void setclass();
  418.  
  419. /* recipient.c */
  420. void sendtolist();
  421. ADDRESS * recipient();
  422. void include();
  423. void sendtoargv();
  424. ADDRESS * getctladdr();
  425.  
  426. /* savemail.c */
  427. void savemail();
  428. int returntosender();
  429.  
  430. /* srvrsmtp.c */
  431. void smtp();
  432.  
  433. /* stab.c */
  434. STAB * stab();
  435.  
  436. /* stats.c */
  437. void markstats();
  438. void poststats();
  439.  
  440. /* sysexits.c */
  441. char * statstring();
  442.  
  443. /* trace.c */
  444. void tTsetup();
  445. void tTflag();
  446.  
  447. /* usersmtp.c */
  448. # ifdef MAIL11V3
  449. int smtpinit();
  450. # else /* ! MAIL11V3 */
  451. int smtpinit();
  452. # endif /* MAIL11V3 */
  453. int smtprcpt();
  454. int smtpdata();
  455. void smtpquit();
  456. int smtpstat();
  457.  
  458. /* util.c */
  459. void stripquotes();
  460. int qstrlen();
  461. char * capitalize();
  462. char * xalloc();
  463. char ** copyplist();
  464. void printav();
  465. char lower();
  466. void xputs();
  467. void makelower();
  468. void buildfname();
  469. bool safefile();
  470. void fixcrlf();
  471. FILE * dfopen();
  472. void putline();
  473. void xunlink();
  474. char * sfgets();
  475. char * fgetfolded();
  476. TIME_TYPE curtime();
  477. bool atobool();
  478. int atooct();
  479. int waitfor();
  480. bool bitintersect();
  481. bool bitzerop();
  482. void printcav();
  483. void WritePid();
  484.  
  485. /* strcnv.c */
  486. # ifdef BIT8
  487. CHAR8U * strcnv();
  488. CHAR8U * strncnv();
  489. CHARSET * getchset();
  490. # endif /* BIT8 */
  491.  
  492. /* version.c */
  493.  
  494. /* random ones */
  495. char * getenv();
  496. FILE * fdopen();
  497. FILE * popen();
  498. TIME_TYPE time();
  499.  
  500. #endif /* __STDC__ */
  501.